package com.site.controller;

import com.site.common.exception.Assert;

/**
 * 测试 Assert 工具类
 */
public class AssertTestController extends BaseController {

    public static void main(String[] args) {
         Assert.isTureOrFalse(true).trueOrFalseHandle(() -> {
            System.out.println("true执行");
        },() -> {
            System.out.println("false执行");
        });
        Assert.isBlankOrNoBlank("Ssss").presentOrElseHandle(System.out::println,() -> {
            System.out.println("空字符时执行");
        });
        Assert.isBlankOrNoBlank("").presentOrElseHandle(System.out::println,() -> {
            System.out.println("空字符时执行");
        });
        Assert.isTrue(true).throwMessage("抛出异常信息");
    }
}
